import 'package:flutter/cupertino.dart';

class AnswerList extends ChangeNotifier {
  final List<Answer> _answerList = [];

  void addAnswer(Answer answer) {
    _answerList.add(answer);
    notifyListeners();
  }
  void clearAnswer() {
    _answerList.clear();
    notifyListeners();
  }

  List<Answer> getAnswerList() {
    return _answerList;
  }
}

class Answer {
  int no;
  int index;

  Answer(this.no, this.index);

  Map<String, dynamic> toMap() {
    return {
      'no': no,
      'index': index,
    };
  }
}
